import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: 'Elm_index',
    redirect: '/goods',
    component: () => import('../views/Index/Elm_index'),
    children: [
      {
        path: 'goods',
        name: 'goods',
        component: () => import('../views/Index/Elm_goods')
      },
      {
        path: 'appraise',
        name: 'appraise',
        component: () => import('../views/Index/Elm_appraise')
      },
      {
        path: 'shops',
        name: 'shops',
        component: () => import('../views/Index/Elm_shops')
      },
    ]
  },
  {
    path: '/details',
    name: 'details',
    component: () => import('../views/Index/Elm_Details')
  }
];

const router = new VueRouter({
  routes
});

export default router;
